<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>服装款式</title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
    <script src="${ctxStatic}/js/DateTimePicker.js"></script>
    <script src="${ctxStatic}/js/layer.js"></script>
    <script src="${ctxStatic}/js/style.js"></script>
   	<script src="${ctxStatic}/dateCalendar/WdatePicker.js"></script>
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/list.css">
    <script>
    $(document).ready(function() {
    	$("select").select2();
        $(window.parent.$('#dtBox1')).DateTimePicker(
                {
                    dateFormat: "yyyy-MM-dd HH:mm",
                    parentElement: ".timeBox",
                }
        );

    });
	
	$(function(){
            $(".tabBox ul li").each(function(){
                var index=$(this).index();

                $(".tabBox ul li").eq(0).addClass("active");

                $(this).click(function(){

                    //alert(index);

                    $(this).addClass("active").siblings().removeClass("active");

                    //$(".tabBoxSm > .tabSm").eq(index).stop(true).show().siblings().stop(true).hide();
					$("#ulSelected").val($(this).val());
					searchListForm();
					var tableW = $(".tabBoxSm > .tabSm").eq(index).find('.tableHead').width();
					var tabodyH = $(".tabBoxSm > .tabSm").eq(index).find('.tableBody').height();
					var tableScrollH = $(".tabBoxSm > .tabSm").eq(index).find('.tableScroll').height();
					if(tabodyH>tableScrollH){
						$(".tabBoxSm > .tabSm").eq(index).find('.tableScroll').css('width',tableW + 18 + 'px')
					}else{
						$(".tabBoxSm > .tabSm").eq(index).find('.tableScroll').css('width','inherit')
					}

                })

            })

        })
        
        //检索 
    function searchListForm() {
    	var params = $("#searchForm").serialize();
    	$("#activity_pane").showLoading();
		$.post("${ctx}/bigcargo/order/searchList",params, function(result) {
			var listHtml = result["bigcargoOrder"];
			var pageHtml = result["page"];
			$("#listHtml").html(listHtml);
			$("#paging").html(pageHtml);
			$("#activity_pane").hideLoading();
		}, 'json');
	}
        
	//重置
	function clean() {
		$("input").val("");
		$("select").val("");
		searchListForm();
		$("select").select2();
	}   
    </script>
    <style type="text/css">
    /* 大货订单 */
    .table-dhddbj{width:50px;}
    .table-dhddhtddh{width:180px;}
    .table-dhddzt{width:120px;}
    .table-dhddkh{width:250px;}
    .table-dhddsl{width:120px;}
    .table-dhddjhrq{width:120px;}
    .table-dhddzcrq{width:120px;}
    .table-dhddqdrq{width:120px;}
    .table-dhddcjz{width:120px;}
    </style>
</head>
<body>
<form id="searchForm">
<div class="listArea" id="activity_pane">
	<div class="listBg">
        <div class="searchArea clearfix">
            <div class="searchLeft clearfix">
                <div class="searchInp clearfix">
                    <p><spring:message code="contract_order" /></p>
                    <input class="w-styleNub" id="contractNO" name="contractNO" value="">
                </div>
                <div class="searchInp clearfix">
                    <p><spring:message code="contract_customer" /></p>
                    <input class="w-customer" id="ognizationName" name="ognizationName" value="">
                </div>
                <%-- <div class="searchInp clearfix">
                    <p><spring:message code="contract_orderType" /></p>
                    <c:set value="ORDER_TYPE" var="orderType"/>
                        <select id="orderTypeCD" name="orderTypeCD" style="width: 110px">
                            <option value=""><spring:message code="quotation_style_pleaseSelect" /></option>
                        <c:forEach items="${fns:getDictList(orderType) }" var="type">
                            <option  value="${type.itemCode}-${type.itemValue}">${type.itemName}</option>
                        </c:forEach>
                        </select>
                </div> --%>
                <%-- <div class="searchInp clearfix">
                    <p>状　　态：</p>
                    <c:set value="ORDER_STATUS" var="orderStatus"/>
                        <select id="indentStatusCD" name="indentStatusCD" style="width: 110px">
                            <option value=""><spring:message code="quotation_style_pleaseSelect" /></option>
                        <c:forEach items="${fns:getDictList(orderStatus) }" var="status">
                            <option  value="${status.itemCode}-${status.itemValue}">${status.itemName}</option>
                        </c:forEach>
                        </select>
                </div> --%>
                <div class="searchInp clearfix">
                <!-- 班组名称  -->
                    <p>班组名称</p>
                    <div class="searchInp">
                            <select  name="userGroupId" id="userGroupId" style="width: 120px">
                                <option value=""><spring:message code="order_please_choose"/></option>
                                <c:forEach items="${groupList}" var="group">
                                    <option value="${group.userGroupID}">${group.groupName}</option>
                                </c:forEach>
                            </select>
                        </div>
                </div>
                <div class="searchInp clearfix">
                    <p><spring:message code="contract_date" /></p>
                    <div class="timeBox">
							<input type="text" class="laydate-icon" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd',onpicked:null})"
								id="dateStart" name="dateStart" style="width: 110px">
							<p class="list">~</p>
							<input type="text" class="laydate-icon" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd',onpicked:null})" id="dateEnd" name="dateEnd"
								style="width: 110px" >
                    </div>        
                </div>               
            </div>
            <div class="searchRight clearfix">
                <button type="button" onclick="searchListForm();"><spring:message code="commom_check" /></button>
                <button type="button" onclick="clean();"><spring:message code="common_reset" /></button>
                <button type="button" onclick="popup('1000px','650px','${ctx}/bigcargo/order/createBigcargoOrder')"><spring:message code="contract_create" /></button>
                <%-- <button type="button"><spring:message code="contract_downLoad" /></button> --%>
            </div>
        </div>
   </div>
        <input type="hidden" id="ulSelected" name="ulSelected" value="">

    <div class="tabBox">
        <ul class="clearfix">
            <li class="active" value="-1"><spring:message code="contract_all" /></li>
            <li value="2"><spring:message code="contract_audit_wait" /></li>
            <li value="1"><spring:message code="contract_audit_ok" /></li>
            <li value="0"><spring:message code="contract_audit_no" /></li>
            <li value="3">生产中</li>
            <li value="4">生产完成</li>
        </ul>
	</div>
    
       <div class="listBg tabPadding overflowX">
        <div class="tableArea tabBoxSm">
            <div class="tableScrollSm" style = "height:650px;overflow: auto;width: 1520px;">
                <table cellpadding="0" class="tableHead">
                    <thead>
                    <tr>
                    	<!-- No. -->
                        <th><p class="table-No"><spring:message code="common_no" /></p></th>
                        <!-- 标记 -->
                        <th><p class="table-dhddbj"><spring:message code="contract_mark" /></p></th>
                        <!-- 合同编号 -->
                        <th><p class="table-dhddhtddh"><spring:message code="contract_code" /></p></th>
                        <!-- 合同状态 -->
                        <th><p class="table-dhddzt"><spring:message code="contract_status" /></p></th>
                        <!-- 客户 -->
                        <th><p class="table-dhddkh"><spring:message code="contract_styleCustomer" /></p></th>
                        <!-- 订单数量 -->
                        <th><p class="table-dhddsl"><spring:message code="contract_orderQuantity" /></p></th>
                        <!-- 完成数量 -->
                        <th><p class="table-dhddsl">完成数量</p></th>
                        <!-- 完成进度 -->
                        <th><p class="table-dhddsl">完成进度</p></th>
                        <!-- 交货日期 -->
                        <th><p class="table-dhddjhrq"><spring:message code="contract_deliveryDate" /></p></th>
                        <!-- 最迟船期 -->
                        <th><p class="table-dhddzcrq"><spring:message code="contract_lastShipDate" /></p></th>
                        <!-- 签订日期 -->
                        <th><p class="table-dhddqdrq"><spring:message code="contract_issueDate" /></p></th>
                        <!-- 创建者 -->
                        <th><p class="table-dhddcjz"><spring:message code="contract_creator" /></p></th>
                    </tr>
                    </thead>
                </table>
                <table cellpadding="0" class="tableBody">
                    <tbody id="listHtml">
                    </tbody>
                </table>
            </div>
         </div>
    
    </div>
	<div id = "paging" ></div>    
	</div>
</form>
<script type="text/javascript">
$(document).ready(function(){
	searchListForm();
	
	});

</script> 
</body>
</html>
